Added some comments in code