Added extra comments & fixed bug