adding location code to location edit