refactoring of the travelAgent