modded unlabeled distance, not sure if good version