add location fuction