updating foreground