rewrote -e handling