Fixing hw1 code