refactor of boolean tracker.