add location related functions