create factory class