patched up unit tests