type optimizations