add factory and model