sort with array