this class is 99% similar to the one used in composite. It seems like anyone who wants to invoke an action from code will be using this class as a buffer to control the output, and we should generalize it, so we have a single implementation for all components.