remove unecessary print statements and empty lines