update documentation with background and foreground modes