Refactor code and add blinking win statement