added function to be implemented for the api