preliminary stuff for saving trajectories to db