adding reference number at depth layers