work wiht matrix