var <- NULL needed to be replaced with var <- list() if implicit extension of elements occurs lateron