addPlayer function