debugging why collapse doesn't work