creating a server example with asynchronous callbacks