added sort-array method