Changed sorting to length of kt