compatible with xcode 6.0.1 and swift v1.0