added bubble sort and callback structure