add factory class