fix for assignment 4