Have inserted comments in the code now