clean up code