adding clean up code