sortArray util method doesn't need var array