first draft of duplexp3 for big values of r