replaced puts statements