converted v_outer to generic method to handle various classes