group selection function and logic to get nav checkmarks to stay checked