Changed temp and temp1 variable names