added code to buffer multiple meshes - untested