replacing instanceCreator by factory everywhere