implemented node based replecement