Method for preparing an outer surface of a planar waveguide so as to be capable of binding target samples along a plurality of predetermined lines, the predetermined lines being arranged such that in operation an evanescent field of coherent light coupled into and propagating through the planar waveguide is scattered at target samples arranged along the plurality of predetermined lines to constructively interfere at a predetermined dectection location with a difference in optical path length which is an integer multiple of the wavelength of the coherent light propagating through the planar waveguide, or the predetermined lines being arranged such that in operation the evanescent field of the coherent light coupled into and propgating through the planar waveguide is scattered at target samples arranged along the plurality of predetermined lines to interefere in predetermined directions within the planar waveguide, the method comprising the steps of: - providing a planar waveguide having an outer surface adapted for attachment of a linker molecule to the outer surface; - sequentially applying at least one plurality of linker molecules (2, 5; 2) to the outer surface, each plurality of the at least one plurality of linker molecules (2, 5; 2) assembling to form an individual layer of linker molecules (2, 5; 2) with individual layers being formed one above the other starting from the outer surface of the planar waveguide, each linker molecule (2, 5; 2) comprising a functional group (22, 52; 22) and a head group (21, 51; 21), the head group (21, 51; 21) being capable of attaching to the outer surface of the planar waveguide or to the functional groups of the preceding layer of linker molecules, and wherein the functional groups (52; 22) of the linker molecules (5; 2) of the uppermost layer are bound to photo-labile protecting groups so that each functional group (52; 22) of the uppermost layer bound to a said photo-labile protecting group is incapable of attaching a complementary functional group of a further molecule; and - exposing those photo-labile protecting groups of the uppermost layer arranged along the plurality of predetermined lines to light of a predetermined wavelength to remove the exposed photo-labile protecting groups from the functional groups (52; 22) to make these functional groups (52; 22) capable of attaching a complementary functional group of a further molecule. - providing a planar waveguide having an outer surface adapted for attachment of a linker molecule to the outer surface; - sequentially applying at least one plurality of linker molecules (2, 5; 2) to the outer surface, each plurality of the at least one plurality of linker molecules (2, 5; 2) assembling to form an individual layer of linker molecules (2, 5; 2) with individual layers being formed one above the other starting from the outer surface of the planar waveguide, each linker molecule (2, 5; 2) comprising a functional group (22, 52; 22) and a head group (21, 51; 21), the head group (21, 51; 21) being capable of attaching to the outer surface of the planar waveguide or to the functional groups of the preceding layer of linker molecules, and wherein the functional groups (52; 22) of the linker molecules (5; 2) of the uppermost layer are bound to photo-labile protecting groups so that each functional group (52; 22) of the uppermost layer bound to a said photo-labile protecting group is incapable of attaching a complementary functional group of a further molecule; and - exposing those photo-labile protecting groups of the uppermost layer arranged along the plurality of predetermined lines to light of a predetermined wavelength to remove the exposed photo-labile protecting groups from the functional groups (52; 22) to make these functional groups (52; 22) capable of attaching a complementary functional group of a further molecule.