refactor brick