added comments for code