add p6
refactor