safer way of handeling EOT