commit
added comments for better understanding