Add constructor to accept maxSteps