refactoring output logic
Add travis.yml