Change bubble sort for inputs