fix location data check, add documentation