improved test for root