When a gas molecule loses energy it becomes