working, but weird rounding errors