Add auto judge functionality