adding a factory class