add logic to finish game