v2 refactor