add std and var for vectors and matrices