finaly added the factory