get rootnode id from layout rather than assuming it will be 1