Initial Swift implementation (iOS 8)