added support for piped command