completed pagi func