A device for delivery of electrical pulses to a desired tissue of a mammal, wherein the device comprises a pulse generating device and an electrode device (200,500,600) connected to the pulse generating device, wherein: - the pulse generating device, by means of an impedance measuring module, is configured to determine conductance and phase angle values between one electrode (200-1,501,601) of the electrode device (200,500,600) and a reference electrode (205;502,503;602-605) of the electrode device (200,500,600) when the electrode device (200,500,600), when in use, is inserted into a desired body part comprising the desired tissue and when pulses based on alternating currents having different frequencies are generated to the desired body part between the electrode (200-1,501,601) and the reference electrode (205;502,503;602-605); - based on the determined conductance and phase angle values, the pulse generating device is configured to determine the type of tissue the electrode device (200,500,600) penetrates, when the electrode device (200,500,600), when in use, is inserted into the desired body part; - based on the determined conductance and phase angle values, the pulse generating device is configured to determine one or more parameters of electrical pulses to be delivered to the desired tissue, when the electrode device (200,500,600) in use is arranged at the desired tissue; and in that - the pulse generating device is configured to generate the electrical pulses having the determined one or more parameters; and in that the electrode device comprises: - one or more needle electrode comprising an elongated insulating cover along its longitudinal envelope surface, having at one end thereof a tip configured to penetrate into the desired body part when in use, and being at the other end thereof configured to be connected to the pulse generating means; characterized in that the reference electrode is a sliding reference electrode surrounding the needle electrode with a spring and configured to push against an entrance surface of the desired body part when in use. - the pulse generating device, by means of an impedance measuring module, is configured to determine conductance and phase angle values between one electrode (200-1,501,601) of the electrode device (200,500,600) and a reference electrode (205;502,503;602-605) of the electrode device (200,500,600) when the electrode device (200,500,600), when in use, is inserted into a desired body part comprising the desired tissue and when pulses based on alternating currents having different frequencies are generated to the desired body part between the electrode (200-1,501,601) and the reference electrode (205;502,503;602-605); - based on the determined conductance and phase angle values, the pulse generating device is configured to determine the type of tissue the electrode device (200,500,600) penetrates, when the electrode device (200,500,600), when in use, is inserted into the desired body part; - based on the determined conductance and phase angle values, the pulse generating device is configured to determine one or more parameters of electrical pulses to be delivered to the desired tissue, when the electrode device (200,500,600) in use is arranged at the desired tissue; and in that - the pulse generating device is configured to generate the electrical pulses having the determined one or more parameters; - one or more needle electrode comprising an elongated insulating cover along its longitudinal envelope surface, having at one end thereof a tip configured to penetrate into the desired body part when in use, and being at the other end thereof configured to be connected to the pulse generating means;