cleaning up code organization