adding unit tests to cover #43