updated server code to work in new dir