replaced print with puts