resolve #4 added better piping