some minor performance optimizations