minor optimizations during review