incorporating scott's comments. consolidated error delegate method, now receives an NSError object