add test setting for travis-ci
improve code quality