finish functionality of slider