Refactored out to methods