ginormous refactor, create topology builder functions