Replaced the original method with refactored method