Refactoring PR in order to make the change more generic