added -w flag to te