collapse output matches expected output