bg refactor
conflict fix