Modifications to label propagation:
- added distance threshold