Initial working code to address issue #10.