the magic numbers for regions here are awkward. Readable constants would be better.