added cooling function to gas, and printout functions to the gas and
elem classes