refactoring
spawning clients