implement vectorstrength function and tests