api function extracted to extra function