added v2 implementation