A method for bonding elements (1,1') comprising the steps of - producing on a main surface of a first element a first solder ball, - producing on a main surface of a second element a second solder ball, - providing contact between said first solder ball and said second solder ball, - bonding said first element and said second element by applying a reflow step whereby said solder balls melt and form a joined solder ball structure wherein: - prior to the bonding step, the first and/or second solder ball is laterally embedded in a layer (4,4') of non-conductive material, by providing said layer of non-conductive material on the main surface of the first and/or the second element, such that the upper part of said first and/or second solder ball is not covered by said non-conductive material, and - said layer (4,4') of non-conductive material is laterally embedding said first and/or second solder ball up to a level parallel to the main surface onto which the non-conductive layer (4,4') is provided, characterized in that: on one of said main surfaces, the layer (4,4') of non-conductive material is provided with an exclusion area, being an area wherein no non-conductive material is present in said area, or wherein in said area a non-conductive layer is present with a lower thickness than on the remainder of the main surface on which said non-conductive layer (4,4') is applied, and on the other main surface, at least one component (30,31,40) is present whereof the height is larger than the height of the solder ball on said other surface, and wherein said component faces said exclusion area when the elements are bonded together, so that due to the exclusion area, said component does not touch the opposite element. - producing on a main surface of a first element a first solder ball, - producing on a main surface of a second element a second solder ball, - providing contact between said first solder ball and said second solder ball, - bonding said first element and said second element by applying a reflow step whereby said solder balls melt and form a joined solder ball structure - prior to the bonding step, the first and/or second solder ball is laterally embedded in a layer (4,4') of non-conductive material, by providing said layer of non-conductive material on the main surface of the first and/or the second element, such that the upper part of said first and/or second solder ball is not covered by said non-conductive material, and - said layer (4,4') of non-conductive material is laterally embedding said first and/or second solder ball up to a level parallel to the main surface onto which the non-conductive layer (4,4') is provided, on one of said main surfaces, the layer (4,4') of non-conductive material is provided with an exclusion area, being an area wherein no non-conductive material is present in said area, or wherein in said area a non-conductive layer is present with a lower thickness than on the remainder of the main surface on which said non-conductive layer (4,4') is applied, and on the other main surface, at least one component (30,31,40) is present whereof the height is larger than the height of the solder ball on said other surface, and wherein said component faces said exclusion area when the elements are bonded together, so that due to the exclusion area, said component does not touch the opposite element.