refactor task
add tests and travis config