added ability to win/lose from code in a callback