refactoring to support multiple topologies