replace instance of check to p.is