modified count_cue