Implementing buble sorting