use reflection to get max line