Improved blink function