bubble sorting array. need to recreate array with unique vals before sorting
verbose solution, but returns exactly what is asked