pass fmatrix as const
check in io module