add methods to controller and factory