wip: topology functions