passing the slider in here feels kinda weird to me