refactor building related