temp is quite a bad name for a variable.