extended to cover both cases