replacing user's department and location with orig_dep and orig_loc in queries