cleaning up code more