make EM/gibbs switchable
remove matrix.cc matrix.h