added vector length method