added possibility to pipe output