getting close still a lot of issues
made corrections with joshint.com