using namedtuple return type in api.maximize