front end parsing of location data and error handling