refactor counting sort