cleaned up code for deployment