add test cases

add test cases
change v4 and v6 logic