improve trip parsing