should we move this up and fail earlier?