use vectors instead of n x 1 matrices