A functional electrical stimulation system (1) for correction of drop foot comprising: a device (3) to be placed on a paretic leg provided with a plurality of multi pad electrodes (315) on one side (31) at least one of said electrodes (315) being configured to provide a stimulating electric signal on the point of the leg on which it is positioned wherein said corresponding stimulating electric signals form a stimulation pattern and at least one sensor (8) to be positioned on either said leg or corresponding foot the sensor (8) being configured to measure information during movement and emit sensor signals indicative thereof. The system further comprises means (6) for calculating a foot trajectory from said sensor signals for detecting gait phase from said foot trajectory for evaluating the quality of gait from said foot trajectory and for if the quality of gait is below a certain threshold modifying said stimulation pattern and means (7) for selectively activating at least one of said electrodes (315) according to said modified stimulation pattern. Method use and computer program product.