modified pi program