add sort to array