refactoring travis segment