Remove repeated data and reorder
Add robust boundary value test