added terminal pung check