make numActive faster