sort items before returning them

sort items before returning