move "var server" into start()