refactoring with struct v7_pstate