addresses issue #366
passed wire testing and updated unit tests.