done for midterm but may need updates if mistakes found