Fixing assignment 4