added a slider and the necessary methods.