A method for optimization of a stimulation specificity of implanted electrodes in excitable tissue of a patient; wherein it comprises the step of electrical stimulation of excitable tissue between one or more combinations of electrode pairs in a cluster of electrodes, or electrical stimulation between one or more combinations of electrode pairs in two or more clusters of electrodes, wherein the two electrodes of said electrode pairs do not belong to the same cluster, wherein the electrical stimulation between different combinations of electrode pairs in a cluster of electrodes, or the electrical stimulation between different combinations of electrode pairs in two or more clusters of electrodes, creates a directed electrical field; wherein the effect of the directed electrical field is assessed after each stimulation step by registering information provided from the patient in view of a therapeutic effect, or by assigning each electrode pair a value related to said information provided by the patient; and choosing, based on the direction of the directed electrical field created, the electrode pair or pairs which give(s) rise to the most favorable assigned value.