update the background calculation