Started the replacement function

Set the tests for replacement

TODO : Do replacement itself