trying to fix complexity on controller