changed puts to print as an alternative