finished server, untested