removed extra lines and print statements