added code for slider