sort arrays in ascending order