implemented src/pkg/sort interface