minor optimizations, divide runs 2x faster