refactor assembler to accept sizes