Refactor to v4