improved flash conditional