added sorted test