committing matrix code