selection now correctly handles groups