first working version
improved errors message using jsonpointer