refacter clone node logic