simple adaptive quad method