created a class for slider