add some delay to avoid flashing on the screen too quickly