Added sort order support