added winning and losing behavior for the view