added basic distance slider functionality