call clear_output first when flash