Adding support for functions