update code for bubble