How to buy stocks the smart way