Added returnGeometry option