bubble improvement and simplification