Added set location function