-combined inputcallback and outputcallback