Really working win function.