added support of -a key and using in the pipeline