added comments, added print statements