DRY up the parent dimension logic