refactoring, add splitting tasks by servers
add tests