Refactoring and add a comment