This fixes #3 issue and completed the assignment