This version works according to spec