added serverMessage event handler.