cleaned up sync and node document
removed splicing from for loop