code to recalculate scenario