updating api pass function