updated Nov 12
update Jan 7, added distance matrix