function can pass variables that used by API function