server with callbacks