command selection and execution