chaging 'distance' for 'range'