add debug option
converting to a uniform Nexus data structure