Implemented foreach loop to build building8 correctly