first method of bubble sort