partly done with test cases, added travis-ci support