added check of p4d state