add tests
refactoring
add Makefile, .travis.yml