Use smaller value for bad ID score

Rewrite code