added the beginnings of the get orig dest function