refactor bricks