player creation to its own function