a solution to circular dependency