fixed conditions syntax and cleaned up stocks to buy method a little