added sorting during indicatoration