Updated with nested element setup so it's more like my own code