now works on xcode