added -w option