add matrix support to assembleData