Adds matrix working