added support for more functions