Adds win function.