1-5 added: converted temp in reverse order with for loop