refactored dinesafe_geo