added comments and addtional print statements