changing Location to location_t