Use helper method to reduce code duplication