refactor blink directive