Distance calculator implemented