forgot to move oldMax out of if statement.