added comments on code