calculate coordinates more prcisely. Fixes #164