new server with cleaner code