distance library
added distance library