refinement: use maximize.