Prepare callSync() function