base matrix functionality fixed