add test coverage for matrix funcs and swap bool return for validate