Added support for choosing the region.
Fixed an error of variable reference without assignment.
Merge pull request #1 from hongbin/master

Added support for choosing the region.