simpler logic for ids