imported Gil's spec from pastebin.com/gpcNExDt