added support for nested function calls with generic units