made a tuple for the amax function, works now.