added way to get data and save in var