added tests and Travis CI config