in-place counting sort added