Getting the table to include distance