adds slider functionality