example asynchronous function on serverside

made second example function asynchronous