recalculate alteration when moving the slider