added tests and travisci support