mproved v_outer speed and added testthat for it as well