refactored assembler