Check if you have the right number of entries before reducing
Better error handling