Word behind changes

Complete function. Working tests.