removed unused selectRegion code