A method for treating an impaired body function in a patient, including the steps of (a) laparoscopically implanting at least one neuroprothesis electrode on a least one endopelvic nerve root of a patient (b) electrostimulating the nerve root with the electrode for a predetermined time period to induce a body function of the patient and (c) during the predetermined time period, instructing the patient to mentally concentrate on performing the body function.