added code adn fixed up section of paper