using NSError instead of strings