starting to clean up code