Added slider logic