add p9
refactor