Trying to fix Assignment 5 Algorithm

^^