getPPI trial and error function