added new function to API