Initial test cases and error check
Implemented word diff logic