Rewrite with proper event watching not with timer scan