added tests for v1 and v2