buildings refactor