swift code from the videos of the WWDC 2014 talks