allow nesting of functions on model