master: added distance