Changed to bubble sort