added variable for each data
corrected submit button click