add method to factory