and how to distinguish input and output