Modified homework, file already working, but slow