Refactoring helper methods