update when enter foreground