Rewrote analysis part using pipe and filter