move api function to private section