began cleaning up code