add checks for root and first argument