Modified lab3a.