Refactored
Fixed blinking