Passing the max levels around instead of dt