done with vectors and matrices