Added sorted predict