shuffling code around preparing for refactoring #12701
oops #12701
grrrr... oops again... #12701