flash button implementation