Fully functional for midterm