rewrote CVA (and subroutines) and fixed missing '-1' subtraction in 'covW'