popup and background working