combine two player process code into one.