server function tested.