trip service legacy code