Added server side sort for aiml edition