added auto distance value