geommetry common functions