base: plug submodels with function call

Implemented as suggested in #14

Reviewed-By: Fedor Indutny <fedor@indutny.com>
0.5.0