refactoring of tests + adding tests
optim for travis ci
optim for travis ci