papi implement almost finished