removed consolidate ref in code