made some beginning changes and added input and various other crap