Update: improved performance of EOT script