Implement enhancements in issue #2

implements #2