error checking for root parenths