added v4 and tests