small modification to SPH_gas routine