[sailfish][Refactoring] Extracted function