added check for root