UPD adding example for creating object with factory