Added get_locations function