update test code to display input and output