more refactoring of old design/code