add Worker, add connect, refactor tests