Refactoring, encapsulate Circuit