def insert_component_after(name, component)
      # iterate over all components, find the component with the given name
      # once found, insert the given component at the following location and return
      components.each_with_index do |c, i|
        if c.name == name
          components.insert(i + 1, component)
          return
        end
      end

      components << component
    end
def insert_component_after(name, component)
      # iterate over all components, find the component with the given name
      # once found, insert the given component at the following location and return
      components.each_with_index do |c, i|
        if c.name == name
          components.insert(i + 1, component)
          return
        end
      end

      components << component
    end
insert the given component after the component with `name`
 if no component is found with that name, the component will be inserted at the end