compute corrected coordinates