implement connecting regions, restructure code and types