delete unnecessary blocks