initial work for issue 399

not ready for merging
This may be an 'autopep8'-ism