improvements to expand/unexpand selection