cleaning up to only collapse bed files