separated slider event logic