crashes if chs == nullptr