adding delete function to location process