This method feels busy.  Is there a good ruby way to consolidate it into less lines?