refactored _list_pins and _base_pin_path