add dff lib and matrix mult