code refactor, solving a problem with actor creation, the problem is not fixed yet.