refactor brick directives part