add correctness fuunction