clean up code for delivery