Refactoring listCost24hours method

Refactoring to better understand and future testing of this method