if (action == 'decrease') {
step *= -1;
}

val += step;