testing code for midterm, made minor changes