started working on cleaning up some code