add client function