removed print statements, fixed rested