minor refactoring Refs item:413