added getState() method for players