some low-hanging optimizations