add tests and travis-ci integration