compiles. modified preassemble and assemble