initial part to dynamically select the origin and the destination stations