reverse inputs