Temperature of a gas is produced due to