Plug submodels with function call

Implemented as suggested in #14