Implement button and slider logic to pass values