added comments
added code