Refactor method.