insert function for track segment