checking context function correctness