added code for sensitivity analysis
final version