Refactor to method.