updated for Xcode4.6