optimizations from otila