Implementing support for custom functions