refactoring based on WCG changes.