Adding in matrix code