Factored out common methods