trying to figure out the correct way to sort 3 numbers