added additioanl comments and write-up