updated for assignment code from A2