replaces factory with name