added functionality to return orginial node not internal one if id is set