added support to directly reference functions instead of strings