fix blinky, refactor a little