Created one ajax request for all endgame scenarios