added correctness testing