Adding data matrix class