Vishesh's code commented