added checking player existence