rearranged some code, made temps depend on elevation