use W instead of WS qualifier
remove nonuseful code
experimenting with reading unix process on stdin with each iteration