fixed typo 'temp' to 'wtr' (temp was undefined)