Refactor bubble