added region selection functionality