produce correct output