A Refactoring method to convert two similar methods into one.