refactor Balancer with Factory