Add SORT procedure