working on performance optimizations, per #8