added methods to factory