add support for directly passing functions to model.start