I wonder if it wouldn't be cleaner to encapsulate this logic in a private/protected function