starts building the graph representation of buildings