Added sort order to elements