Works with correct output