Refactoring in progress now it is not working