added matrix self test to start up