added files, fixed up some code