removes unneccessary puts statements