updated slider to handle closing single content at a time