removed print statements and added comments