improve slider functionality