Mastery-Based Adaptive Learning for Middle School and High School Math