restructure prototype of payporte