Working Program with Bubble and Merge