added pnp
Refactoring
more refactoring