updated slider code