generalizing change location functionality