pass Server to syncFunc