bug fixes to make the models work, but the assemble() function is broken