changed prints using puts to print