added location comparison functionality