defined 'playerFactory' with