creating factory files for existing models