and a little more refactoring

one more line untested