Added slider drag logic