Adding the bug fixed version from HW6.