use dvec class for arithmetic operations on vectors