edit slider function