refactor assembler