set up a loop that initates a conditonal test on the boolean ascending
added in the ability to sort duplicates and to work out there length