Adding win and lose functionalities