delete print statements/refactor code