used xcode to debug some of the editing code