added special case for root directory