factory combined into model.