add selection and output