renamed function printBubbles