add code for slider