added set location functionality