adding temp after data loss
fixed all the code I lost