documentation and fixed a rounding bug