follow example of vector, use solve instead of mean