added choice of output