Refactor p02