add get_location method