end test of check function