added support for preferred region, as requested in issue #40