custom functions.
Change in api for more flexibility.