add visit count, and complete fixing huge bug regrading reactivity