add proper judging