added distance math