Trying to solve circular reference problem