hit/miss switch works. added tests.