added -w flag