turn max age into var