Changed slider code