add function checkPoint