slider and refactor