Added support for sql functions