added test for collapse