added comments in Code