begin to merge location
add location fuction