this is roughly what i'd want the model factory to look like; doesn't quite compile just yet though