added support for alternatives in output