restructure prototype of payporte part 2