implement main factory class