working background implementation