reconnected memoize + examples for qp