reworked pp as non class implementation