updated version of animated collapse