fixed generate data parameters bug and added localstorage iteration