join_by_track() function implemented in structures.py