some performance improvements (very minor)