revise the judge functions