a few more minor performance improvements