Add distance array