corrected some distance problems and missing VALUEs