Implemented guaranteed maximum finding.