added comments on the refactoring