Modify lab7 controller