Judge questions legality of abortions