environment : temp update; pM: checkForNeeds added; temperature global