assignment 3, fix for assignment 2