Add support for user defined functions