handle invoke from server