cleaning up code