#210 did some minor optimizations