work with factory.js refactoring :-)