sorting array
update

fixes and update