Added sort to array