Refactoring the method calls