refactoring and travis for running test