use the correct function API