Add node from beginning and end — model node detection