main.R and create.dataframe working as supposed