some tiny optimizations