fix rounding errors
validate fields