Redo length with sum and map