mandates judicial inquiry