simple version of bubble sort