refactor buildings