first version server with callback