modified model factory