made corrections to code