background flashing is cleaner now, more elegant code