update documentation with background and foreground mode