Rectifying issues in the assignment 8