changes to enter matrix