Extracted  callFunction