refactored process player method