remove repeated codes of v2