Refactoring, helper methods