brick txt refactoring