mainfunction post and checkpointreached post