updated blink function