fixing up code for deployment