Added sort algorithm