Working with factory