improvements to unit tests