added comments towards the end
added code link