making collapse work