added some comments, fixed an issue with the blinking