created function for slider, updated styles in styles.css