couple optimizations