upadated bubble sort for more printing