slider working in both direction