added win and lose functions