changes to fit the new swift syntax with xcode 6 beta 4