implement resign and win command