Optimization of stepwise gradient elution in columns chromatography