crush algorithm