added support for function calls