some optimizations, discovered division bug