moved flash to the end of timer interval to fix annoying immediate flash
add license