slider working with given max and mins