implemented sorting