add slider functionality