updating slider functionality